<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>拍卖设置</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>
    <style>

    </style>
</head>

<body>
    <!--头部-->
    <div class="public-header flex">
        <!--<span class="public-header-left-search"></span>-->
        <span class="public-header-left-back"></span>
        <span class="public-header-center">拍卖设置</span>
        <span class="public-header-right">发布</span>
    </div>

    <!--正文-->
    <div class="Auction-settings bc-gray">
        <section class="section1">
            <ul>
                <li class="flex">
                    <span>截止时间</span>
                    <input type="text" style="text-align:right;" placeholder="时间格式：xxxx.xx.xx">
                </li>
                <li class="flex">
                    <span>分类</span>
                    <em contenteditable="true">内容内容</em>
                </li>
                <li class="flex">
                    <span>起拍价</span>
                    <input type="text" style="text-align:right;">
                </li>
                <li class="flex">
                    <span>加价幅度</span>
                    <input type="text" style="text-align:right;">
                </li>
            </ul>
        </section>
        <p class="t1">可选设置</p>
        <section class="section2">
            <ul>
                <li class="flex">
                    <span>7天包退</span>
                    <div class="checkbox checkbox-slider--b-flat">
                        <label>
				<input type="checkbox"><span></span>
			</label>
                    </div>
                </li>
                <li class="flex">
                    <span>包邮</span>
                    <div class="checkbox checkbox-slider--b-flat">
                        <label>
				<input type="checkbox"><span></span>
			</label>
                    </div>
                </li>
                <li class="flex">
                    <span>保证金&nbsp;&nbsp;&nbsp;<font contenteditable="true">100</font></span>
                    <div class="checkboxFour">
                        <input type="radio" value="21" id="checkboxFourInput" name="aa" />
                        <label for="checkboxFourInput"></label>

                    </div>
                    <i>21手</i>
                    <div class="checkboxFour1">
                        <input type="radio" value="300" id="checkboxFourInput1" name="aa" />
                        <label for="checkboxFourInput1"></label>

                    </div>
                    <i>21手</i>
                </li>

            </ul>
        </section>
        <p class="t2">可选设置</p>
        <section class="section3">
            <ul>
                <li class="flex">
                    <span>高级设置</span>
                    <em>2017.07.08</em>
                </li>

            </ul>
        </section>
        <!-- <div class="box">
            <p class="tip">
                1.新增 卖家保证金 自动从余额扣除，是否开启此功能？<br>
                2.此功能可在 卖家设置中心的 拍卖设置中更改。
            </p>
            <span>确认开启</span>
            <button>取消</button>
        </div> -->
    </div>



    <script>
        $(function () {
            $('.public-header-right').click(function () {
                let time = $('.section1 ul li:nth-child(1) input').val();
                time = new Date(time+' 00:00:00:00')
                console.log(time)
                let price = $('.section1 ul li:nth-child(3) input').val();
                let extent = $('.section1 ul li:nth-child(4) input').val();
                let return_good = $('.section2 ul li:nth-child(1) input').attr('class') == 'checked' ?
                    1 : 0
                let mail = $('.section2 ul li:nth-child(2) input').attr('class') == 'checked' ?
                    1 : 0
                let money = $('.section2 ul li:nth-child(3) span font').html();
                $.ajax({
                    url: base_url + 'ZITAOHUI/saveAuctionSet',
                    tyoe: 'get',
                    data: {
                        auctionDeadline: time,
                        startingPrice: price,
                        produceAuctionNumber: extent,
                        sevenReturn: return_good,
                        mail: mail,
                        auctionDeposit: money,
                        produceFixedPrice: 0,
                        produceFirstType: 1,
                        produceSecondType: 1,
                        stor
                    },
                    success: function (data) {
                        console.log(data)
                    }
                })

            })
            $('.section2 ul li:nth-child(1) input').change(function () {
                $(this).toggleClass('checked');
            })
            $('.section2 ul li:nth-child(2) input').change(function () {
                $(this).toggleClass('checked');
            })
            $('.section3 ul li').click(function () {
                window.location.href = '../page/Auction-settings.1.html'
            })

        })
    </script>
</body>

</html>